﻿using UnityEngine;
using System.Collections;

public class TipItem : MonoBehaviour {
    public GameObject skillIcon1;

    public GameObject skillNameLabel1;

    public GameObject skillDecLabel1;

    public GameObject skillIcon2;

    public GameObject skillNameLabel2;

    public GameObject skillDecLabel2;
 
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
    public void SetDes(Battle.SkillType skillType1, string skillName, string skillDec, Battle.SkillType skillType2, string skillName2, string skillDec2) 
    {
        if (skillType1 == Battle.SkillType.Skill2)
        {
            skillIcon1.GetComponent<UISprite>().spriteName = "tipskill";
        }
        else if (skillType1 == Battle.SkillType.Ultimate)
        {
            skillIcon1.GetComponent<UISprite>().spriteName = "tipUlt";
        }
        skillNameLabel1.GetComponent<UILabel>().text = skillName;
        skillDecLabel1.GetComponent<UILabel>().text = skillDec;
        if (skillType2 == Battle.SkillType.Skill2)
        {
            skillIcon2.GetComponent<UISprite>().spriteName = "tipskill";
        }
        else if (skillType2 == Battle.SkillType.Ultimate)
        {
            skillIcon2.GetComponent<UISprite>().spriteName = "tipUlt";
        }
        skillNameLabel2.GetComponent<UILabel>().text = skillName2;
        skillDecLabel2.GetComponent<UILabel>().text = skillDec2;
    }

   
}
